#include<iostream>
#include<math.h>
#include<algorithm>
#include<stdlib.h>
#include"apis.h"
using namespace std;

char com[30][20]={
"midpoint","vsum","vsub"

};

int excom(char *command);
int exold(int i);

void ope_midpoint(void);

int main()
{
	cout<<"The tool for Plane analytic geometry\n";
	cout<<"Input the older to start your opeartions\n";
	char older[30];cin>>older;
	excom(older);
	return 0;
}

int excom(char *command)
{
	for(int i=0;i<20;i++)
	{
		if(strcmp(command,com[i])==0)
		{
			exold(i);
			return 0;
		}
	}
}

int exold(int i)
{
	switch(i)
	{
	case 0: ope_midpoint();break;
	case 1:break;
	case 2:break;
	default:
		cout<<"Wrong\n";
	}

}

void ope_midpoint(void)
{
	cout<<"Get the middle point \b\b ";
	cout<<"Input these two points\n";
	float x1,x2,y1,y2;
	cin>>x1>>y1>>x2>>y2;
	pointmidcoo(x1,y1,x2,y2);

}
